﻿Imports System.Windows.Forms
Imports System.Drawing.Text
Imports System.Drawing.Drawing2D

Public Class CheckBoxExtended
    Inherits CheckBox

    Private _hint As TextRenderingHint = TextRenderingHint.SystemDefault

    Public Property TextRenderingHint() As TextRenderingHint

        Get

            Return Me._hint
        End Get

        Set(value As TextRenderingHint)

            Me._hint = value
        End Set
    End Property

    Protected Overrides Sub OnPaint(pe As PaintEventArgs)

        pe.Graphics.TextRenderingHint = TextRenderingHint
        pe.Graphics.SmoothingMode = SmoothingMode.HighQuality

        MyBase.OnPaint(pe)
    End Sub
End Class
